# src/CMakeLists.txt
# Makefile for build miragon library
# @author Varphone Wong <varphone@qq.com>
# @date   2018/06/14
#
cmake_minimum_required(VERSION 3.0.2)

# Define the project name and version
project(miragon
	VERSION ${MIRAGON_VERSION}
)

# Add sources to build hivcap library
list(APPEND SOURCES
	eventloop.cpp
	miragon.cpp
	impl/eventloop.cpp
)

# Add the include directory to system includes
include_directories(
	${CMAKE_SOURCE_DIR}/include
	${Boost_INCLUDE_DIRS}
)

link_directories(${Boost_LIBRARY_DIRS})

# Add library target
add_library(${PROJECT_NAME} SHARED ${SOURCES})

# Set target properties:
#   VERSION for ${lib.so}.x.y.z
#   SOVERSION for ${lib.so}.x.y
set_target_properties(${PROJECT_NAME} PROPERTIES
	VERSION ${PROJECT_VERSION}
	SOVERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}
)
